{extend name="base" /}
{block name="title"}
<title>首页内容</title>

<script type="text/javascript" src="__ORG__/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__ORG__//ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__ORG__/ueditor/lang/zh-cn/zh-cn.js"></script>
{/block}
{block name="content"}

<fieldset class="layui-elem-field layui-field-title">
    <legend>
        <span class="layui-breadcrumb">
            <a><cite>首页内容管理</cite></a>
        </span>
    </legend>
    <br>
    <!--<a href="{:url('admin/lunbo/add', ['type' => request()->route('type')])}" class="layui-btn">添加首页内容</a>
    <a href="{:url('admin/lunbo/index', ['type' => request()->route('type')])}" class="layui-btn layui-btn-normal" target="">首页内容列表</a>-->
</fieldset>
<!--<fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
    <legend>方框风格的表单集合</legend>
</fieldset>-->

<form class="layui-form layui-form-pane" action="" method="post">
    <table class="layui-table">
        <colayui-inputroup>
            <col width="10%">
            <col width="60%">
            <col width="20%">
        </colayui-inputroup>
        <thead>
        <tr>
            <th class="tc">名称</th>
            <th class="tc">输入内容</th>
            <th class="tc">描述</th>
        </tr>
        </thead>
        <tbody>
        <tr align="center">
            <td  align="center" colspan="3" style="height: 40px;"><b>1.内容区域管理</b></td>
        </tr>
        <tr>
            <td class="tc" width="10px"><i class="require">*</i>内容部分：</td>
            <td>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">内容：</label>
                    <div class="layui-input-block">
                        <textarea style="height: 230px;width: 1000px;" id="LAY_demo_editor" placeholder="请输入内容" name="content1" class="layui-textarea">{$data.content1}</textarea>
                    </div>
                </div>
            </td>
            <td></td>
        </tr>

        <tr>
            <td colspan="2">
                <div class="layui-form-item">
                    <!--<button class="layui-btn" lay-submit="" lay-filter="sub">提交</button>-->
                    <input type="submit" class="layui-btn" value="提交">
                </div>
            </td>
            <td></td>
        </tr>
        </tbody>
    </table>
</form>
{/block}
{block name="js"}
<script type="text/javascript" src="__ORG__/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
    layui.use(['form', 'layedit', 'laydate','element','upload'], function () {
        var form = layui.form, layer = layui.layer, layedit = layui.layedit, $ = layui.jquery;

        //创建一个编辑器
        //var editIndex = layedit.build('LAY_demo_editor');
        UE.getEditor('LAY_demo_editor');

        //自定义验证规则
        form.verify({
            name: function (value) {
                if (value.length < 2) {
                    return '标题至少得2个字符啊';
                }
            }
            , pass: [/(.+){6,12}$/, '密码必须6到12位']
            , content: function (value) {
                layedit.sync(editIndex);
            }
        });

        //监听提交
        form.on('submit(sub)', function (data) {
            /*layer.alert(JSON.stringify(data.field), {
             title: '最终的提交信息'
             });*/
            return true;
        });

        // you code ...

    });
</script>
{/block}